﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using Visifire.Gauges;

namespace CPPEI.Coolzon.UI.DataPartLib
{
    public partial class DataGaugeDoubleCircularScale
    {
        public MinorTicks GetMinor2Ticks()
        {
            MinorTicks minor2Ticks = new MinorTicks();
            minor2Ticks.Visibility = IsMinor2TicksEnabled ? Visibility.Visible : Visibility.Collapsed;
            minor2Ticks.Background = Minor2TicksBackground==null?null: Minor2TicksBackground.Brush;
            minor2Ticks.BorderBrush = Minor2TicksBorderBrush==null? null : Minor2TicksBorderBrush.Brush;
            minor2Ticks.BorderThickness = Minor2TicksBorderThickness;
            minor2Ticks.Placement = Minor2TicksPlacement;
            minor2Ticks.Shape = Minor2TicksShape;
            minor2Ticks.TickLength = Minor2TicksTickLength;
            minor2Ticks.TickWidth = Minor2TicksTickWidth;

            return minor2Ticks;
        }
        private BrushEx minor2TicksBackground;
        private BrushEx minor2TicksBorderBrush;
        private Thickness minor2TicksBorderThickness;
        private PlacementTypes minor2TicksPlacement;
        private Shapes minor2TicksShape;
        private double? minor2TicksTickLength;
        private double? minor2TicksTickWidth;

        [Category("第二表盘次要刻度")]
        [DisplayName("第二表盘次要刻度背景颜色")]
        [Description("Minor2TicksBackground")]
        [Editor(typeof(UI.XProperty.Editors.XBrushEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Minor2TicksBackground", "次要刻度背景颜色")]
        public BrushEx Minor2TicksBackground
        {
            get
            {
                return minor2TicksBackground;
            }

            set
            {
                minor2TicksBackground = value;
                Refresh();
            }
        }

        [Category("第二表盘次要刻度")]
        [DisplayName("第二表盘次要刻度边框颜色")]
        [Description("Minor2TicksBorderBrush")]
        [Editor(typeof(UI.XProperty.Editors.XBrushEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Minor2TicksBorderBrush", "次要刻度边框颜色")]
        public BrushEx Minor2TicksBorderBrush
        {
            get
            {
                return minor2TicksBorderBrush;
            }

            set
            {
                minor2TicksBorderBrush = value;
                Refresh();
            }
        }

        [Category("第二表盘次要刻度")]
        [DisplayName("第二表盘次要刻度边框大小")]
        [Description("Minor2TicksBorderThickness")]
        [Editor(typeof(UI.XProperty.Editors.XThicknessEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Minor2TicksBorderThickness", "次要刻度边框大小")]
        public Thickness Minor2TicksBorderThickness
        {
            get
            {
                return minor2TicksBorderThickness;
            }

            set
            {
                minor2TicksBorderThickness = value;
                Refresh();
            }
        }

        [Category("第二表盘次要刻度")]
        [DisplayName("第二表盘次要刻度位置")]
        [Description("Minor2TicksPlacement")]
        [Editor(typeof(UI.DataPartLib.XProperty.Editors.XPlacementTypesEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Minor2TicksPlacement", "次要刻度位置")]
        public PlacementTypes Minor2TicksPlacement
        {
            get
            {
                return minor2TicksPlacement;
            }

            set
            {
                minor2TicksPlacement = value;
                Refresh();
            }
        }


        [Category("第二表盘次要刻度")]
        [DisplayName("第二表盘次要刻度形状")]
        [Description("Minor2TicksShape")]
        [Editor(typeof(UI.DataPartLib.XProperty.Editors.XShapesEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Minor2TicksShape", "次要刻度形状")]
        public Shapes Minor2TicksShape
        {
            get
            {
                return minor2TicksShape;
            }

            set
            {
                minor2TicksShape = value;
                Refresh();
            }
        }

        [Category("第二表盘次要刻度")]
        [DisplayName("第二表盘次要刻度长度")]
        [Description("Minor2TicksTickLength")]
        [Editor(typeof(UI.XProperty.Editors.XDoubleNullEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Minor2TicksTickLength", "次要刻度长度")]
        public double? Minor2TicksTickLength
        {
            get
            {
                return minor2TicksTickLength;
            }

            set
            {
                minor2TicksTickLength = value;
                Refresh();
            }
        }

        [Category("第二表盘次要刻度")]
        [DisplayName("第二表盘次要刻度宽度")]
        [Description("Minor2TicksTickWidth")]
        [Editor(typeof(UI.XProperty.Editors.XDoubleNullEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Minor2TicksTickWidth", "次要刻度宽度")]
        public double? Minor2TicksTickWidth
        {
            get
            {
                return minor2TicksTickWidth;
            }

            set
            {
                minor2TicksTickWidth = value;
                Refresh();
            }
        }
        [Category("第二表盘次要刻度")]
        [DisplayName("第二表盘次要刻度是否显示")]
        [Description("IsMinor2TicksEnabled")]
        [Editor(typeof(UI.XProperty.Editors.XBooleanEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "IsMinor2TicksEnabled", "次要刻度是否显示")]
        public bool IsMinor2TicksEnabled
        {
            get
            {
                return isMinor2TicksEnabled;
            }

            set
            {
                isMinor2TicksEnabled = value;
                Refresh();
            }
        }

        private bool isMinor2TicksEnabled;
    }
}
